package com.chexiehui.jc.event;

import com.blankj.utilcode.util.StringUtils;
import com.chexiehui.jc.entity.WeatherNow;

import java.io.Serializable;

public class WeatherInfo implements Serializable {
    private WeatherNow now;
    private String status;//"ok",

    private String cityName;

    public WeatherNow getNow() {
        return now == null ? now = new WeatherNow() : now;
    }

    public String getCityName() {
        return StringUtils.isTrimEmpty(cityName) ? "正在定位" : cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    public void setNow(WeatherNow now) {
        this.now = now;
    }

    public String getStatus() {
        return status == null ? "" : status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    /* {
        "HeWeather5": [{
        "aqi": {
            "city": {
                "aqi": "63",
                        "qlty": "良",
                        "pm25": "30",
                        "pm10": "76",
                        "no2": "51",
                        "so2": "8",
                        "co": "0.8",
                        "o3": "21"
            }
        },
        "basic": {
            "city": "贵阳",
                    "cnty": "中国",
                    "id": "CN101260101",
                    "lat": "26.57834244",
                    "lon": "106.71347809",
                    "update": {
                "loc": "2020-07-28 01:03",
                        "utc": "2020-07-27 17:03"
            }
        },
        "daily_forecast": [
        {
            "astro": {
            "mr": "13:49",
                    "ms": "00:33",
                    "sr": "06:16",
                    "ss": "19:42"
        },
            "cloud": "25",
                "cond": {
            "code_d": "101",
                    "code_n": "101",
                    "txt_d": "多云",
                    "txt_n": "多云"
        },
            "date": "2020-07-28",
                "hum": "87",
                "pcpn": "0.0",
                "pop": "25",
                "pres": "873",
                "tmp": {
            "max": "30",
                    "min": "21"
        },
            "uv": "5",
                "vis": "24",
                "wind": {
            "deg": "170",
                    "dir": "南风",
                    "sc": "1-2",
                    "spd": "1"
        }
        }, {
            "astro": {
                "mr": "14:52",
                        "ms": "01:14",
                        "sr": "06:17",
                        "ss": "19:41"
            },
            "cloud": "25",
                    "cond": {
                "code_d": "101",
                        "code_n": "101",
                        "txt_d": "多云",
                        "txt_n": "多云"
            },
            "date": "2020-07-29",
                    "hum": "90",
                    "pcpn": "0.0",
                    "pop": "25",
                    "pres": "873",
                    "tmp": {
                "max": "29",
                        "min": "22"
            },
            "uv": "11",
                    "vis": "24",
                    "wind": {
                "deg": "189",
                        "dir": "南风",
                        "sc": "3-4",
                        "spd": "18"
            }
        }, {
            "astro": {
                "mr": "15:56",
                        "ms": "01:58",
                        "sr": "06:17",
                        "ss": "19:40"
            },
            "cloud": "25",
                    "cond": {
                "code_d": "101",
                        "code_n": "101",
                        "txt_d": "多云",
                        "txt_n": "多云"
            },
            "date": "2020-07-30",
                    "hum": "93",
                    "pcpn": "0.0",
                    "pop": "25",
                    "pres": "874",
                    "tmp": {
                "max": "30",
                        "min": "21"
            },
            "uv": "2",
                    "vis": "20",
                    "wind": {
                "deg": "178",
                        "dir": "南风",
                        "sc": "1-2",
                        "spd": "10"
            }
        }],
        "now": {
            "cond": {
                "code": "101",
                        "txt": "多云"
            },
            "dew": "18",
                    "fl": "22",
                    "hum": "77",
                    "pcpn": "0.0",
                    "pres": "873",
                    "tmp": "21",
                    "vis": "16",
                    "wind": {
                "deg": "93",
                        "dir": "东风",
                        "sc": "2",
                        "spd": "6"
            }
        },
        "status": "ok",
                "suggestion": {
            "air": {
                "brf": "中",
                        "txt": "气象条件对空气污染物稀释、扩散和清除无明显影响。"
            },
            "comf": {
                "brf": "较不舒适",
                        "txt": "白天天气多云，并且空气湿度偏大，在这种天气条件下，您会感到有些闷热，不很舒适。"
            },
            "cw": {
                "brf": "适宜",
                        "txt": "适宜洗车，未来持续两天无雨天气较好，适合擦洗汽车，蓝天白云、风和日丽将伴您的车子连日洁净。"
            },
            "drsg": {
                "brf": "热",
                        "txt": "天气热，建议着短裙、短裤、短薄外套、T恤等夏季服装。"
            },
            "flu": {
                "brf": "少发",
                        "txt": "各项气象条件适宜，发生感冒机率较低。但请避免长期处于空调房间中，以防感冒。"
            },
            "sport": {
                "brf": "较适宜",
                        "txt": "天气较好，较适宜进行各种运动，但考虑气温较高且湿度较大，请适当降低运动强度，并及时补充水分。"
            },
            "trav": {
                "brf": "适宜",
                        "txt": "天气较好，但丝毫不会影响您的心情。微风，虽天气稍热，却仍适宜旅游，不要错过机会呦！"
            },
            "uv": {
                "brf": "中等",
                        "txt": "属中等强度紫外线辐射天气，建议涂擦SPF高于15、PA+的防晒护肤品，戴帽子、太阳镜。"
            }
        }
    }]
    }*/

}


